function Ankhy_Paladin_3()

	------------------------
	-- TO DO LIST
	-- Hammer of Wrath cast on every mob with 20% or less hp within reach without loosing target
	-- Cast BoP on players and self with 6 seconds left of "Iron Prison" debuff
	------------------------
	
		-- Cast Blessings
	if not PlayerIsSOLO() then
		if not (ccrPlayerHasBuff("Mark of the Wild") or ccrPlayerHasBuff("Embrace of the Shale Spider") or ccrPlayerHasBuff("Legacy of the Emperor") or ccrPlayerHasBuff("Blessing of Kings"))
			then
				ccrCast("Blessing of Kings")
				return
		else
			if not (ccrPlayerHasBuff("Roar of Courage") or ccrPlayerHasBuff("Spirit Beast Blessing") or ccrPlayerHasBuff("Grace of Air") or ccrPlayerHasBuff("Blessing of Might"))
			then
				ccrCast("Blessing of Might")
				return
			end	
		end
	end	
	
	ccR_Paladin_SealSwitching()	
	-- Autoaccept LFR invite
		AcceptProposal();
		
		-- Avenging Wrath
		if ccrTargetIsBoss() 
			and SpellIsReady("Avenging Wrath") 
			and ccrPlayerIsInCombat() 
			and ccrPlayerHasBuff("Inquisition") 
			then
				ccrCast("Avenging Wrath")
			return
		end
		-- Guardian of Ancient Kings
		if ccrTargetIsBoss() 
			and SpellIsReady("Guardian of Ancient Kings") 
			and ccrPlayerIsInCombat() 
			and ccrPlayerHasBuff("Inquisition") 
			then
				ccrCast("Guardian of Ancient Kings")
			return
		end
		-- Holy Avenger
		if ccrTargetIsBoss()
			and SpellIsReady("Holy Avenger") 
			and ccrPlayerIsInCombat() 		
			and ccrPlayerHasBuff("Inquisition") 
			and ccrHolyPower() <= 2 
			then
				ccrCast("Holy Avenger")
			return
		end
		-- Buffs\Pots
		if ccrTargetIsBoss()
			and ccrPlayerIsInCombat()
			and ccrPlayerHasBuff("Inquisition") 
			and (not ccrPlayerHasBuff("Ancient Power") or ccrPlayerHasBuffStacks("Ancient Power", 12)) 
			and glovesenable == 1 and glovescd == 0 
			then
				UseInventoryItem(10)
			return
		end
		-- Racials
		if useCDS and UnitRace("Player") == "Orc" and SIR("Blood Fury") == 0 then CastSpellByID(20572,false) return end -- blood fury
		if useCDS and UnitRace("Player") == "Troll" and SIR("Berserking") == 0 then CastSpellByID(26297,false) return end -- berserking
		-- Inquisition
		if (not ccrPlayerHasBuff("Inquisition") or ccrPlayerHasBuffRemaining("Inquisition", 2)) 
			and (ccrHolyPower() >= 3 or ccrPlayerHasBuff("Divine Purpose")) 
			then
			ccrCast("Inquisition")
				return
		end
-- Tier 6		
		-- Execution Sentence
		if SpellIsReady("Execution Sentence") 
			and ccrPlayerHasBuff("Inquisition") 
			and (ccrPlayerHasBuff("Ancient Power") or ccrPlayerHasBuffStacks("Ancient Power", 12)) 
			then
				ccrCastAttack("Execution Sentence")
			return
		end
		-- Light's Hammer	
		if SpellIsReady("Light's Hammer") 
			and (ccRS.Auto_AoE and vCount >= ccRS.Paladin_3_AoECount) or (not ccRS.Auto_AoE and ccRS.Manual_AoE)
			and ccrPlayerHasBuff("Inquisition") 
			and (not ccrPlayerHasBuff("Ancient Power") or ccrPlayerHasBuffStacks("Ancient Power", 12)) 
			then
				ccrCast("Light's Hammer")
				CastAtLocation(Player:GetLocation())
			return
		end	
		-- Divine Storm with 5HP or Devine Purpose or Holy Avenger
		if ccrPlayerCount(8) > 2
			and (ccrHolyPower() == 5 or ccrPlayerHasBuff("Divine Purpose")) or (ccrPlayerHasBuff("Holy Avenger")) 
			and not ccrPlayerHasBuff("Templar's Verdict")
			then
				ccrCast("Divine Storm")
			return
		end
		-- Hammer of the Righteous
		if ccrPlayerCount(8) > 2
			and SpellIsReady("Hammer of the Righteous") 
			then
				ccrCast("Hammer of the Righteous")
			return
		end	
		-- Templar's Vedict with Holy Avenger
		if #tblPGetMeleeEnemies > 0
			and  #tblPGetMeleeEnemies <= 1
			and (ccrHolyPower() == 5 or (ccrPlayerHasBuff("Holy Avenger") and ccrHolyPower() >= 3)) 
			then
				ccrCastAttack("Templar's Verdict")
			return
		end
		-- Templar's Verdics with Templar's Verdict - Tier15 4p bonus
		if #tblPGetMeleeEnemies > 0
			and  #tblPGetMeleeEnemies <= 1
			and ccrPlayerHasBuff("Templar's Verdict") 
			and ccrPlayerHasBuffRemaining("Templar's Verdict", 4) 
			then
				ccrCastAttack("Templar's Verdict")
			return
		end
		-- Hammer of Wrath
		if SpellIsReady("Hammer of Wrath") 
			then
				ccrCastAttack("Hammer of Wrath")
			return
		end
		if SpellCDDuration("Hammer of Wrath") > 0 
			and SpellCDDuration("Hammer of Wrath") <= 0.2 
			then 
			return 
		end
		-- Templar's Verdict with Avenging Wrath
		if #tblPGetMeleeEnemies > 0
			and  #tblPGetMeleeEnemies <= 1
			and SpellIsReady("Templar's Verdict") 
			and ccrPlayerHasBuff("Avenging Wrath") 
			then
				ccrCastAttack("Templar's Verdict")
			return
		end
		-- Crusader Strike
		if SpellIsReady("Crusader Strike") then
			ccrCastAttack("Crusader Strike")
			return
		end
		if SpellCDDuration("Crusader Strike") > 0 
			and SpellCDDuration("Crusader Strike") <= 0.2 
			then 
			return 
		end
		-- Judgement
		if SpellIsReady("Judgment") 
			then
			ccrCastAttack("Judgment")
			return
		end
		if SpellCDDuration("Judgment") > 0 
		and SpellCDDuration("Judgment") <= 0.2 
			then 
			return 
		end
		-- Divine Storm with Divine Crusader - Tier16 4p bonus
		if ccrPlayerHasBuff("Divine Crusader") 
			then
				ccrCast("Divine Storm")
			return
		end
		if SpellIsReady("Exorcism") 
			then
			ccrCastAttack("Exorcism")
			return
		end
		if SpellCDDuration("Exorcism") > 0 
		and SpellCDDuration("Exorcism") <= 0.2 
			then 
			return 
		end
		if SpellIsReady("Templar's Verdict") 
		and ccrPlayerHasBuff("Inquisition", 4) 
			then
			ccrCastAttack("Templar's Verdict")
			return
		end
	end	
